//
//  DataBase.h
//  Lesson-UI-19-Question1
//
//  Created by lanou3g on 15/11/26.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import <Foundation/Foundation.h>

@class MovieDetail;
@class UserInformation;
@interface DataBase : NSObject

+ (DataBase *)sharedDataBase;

#pragma mark - 将数组归档
+ (NSData *)dataOfArray:(NSMutableArray *)Array forKey:(NSString *)key;
#pragma mark - 反归档
+ (NSMutableArray *)unarchiverObject:(NSData *)data forKey:(NSString *)key;


//打开数据库
- (void)openDB;
//添加
- (void)insertUserInformation:(UserInformation *)userInformation;
//修改
- (void)updataUserInformationMovieArray:(NSMutableArray *)movieArray activity:(NSMutableArray *)activity withUserName:(NSString *)userName;
//根据用户名查找信息
- (UserInformation *)selectInformationWithUserName:(NSString *)userName;

- (NSArray *)seleAllUserInformations;
- (void)CloseDB;
@end
